package i2.application.fmw.struts.actions;


public class Scrud<E> {

	private static final long serialVersionUID = 1L;

	private ScrudAction action;
	
	private E entity;
	
	public boolean isCreate() {
		return action.equals(ScrudAction.CREATE);
	}
	
	public boolean isRead() {
		return action.equals(ScrudAction.READ);
	}
	
	public boolean isUpdate() {
		return action.equals(ScrudAction.UPDATE);
	}
	
	public boolean isDelete() {
		return action.equals(ScrudAction.DELETE);
	}
	
	public E getEntity() {
		return entity;
	}

	public void setEntity(E entity) {
		this.entity = entity;
	}

	public void setAction(ScrudAction action) {
		this.action = action;
	}
	
}
